<!DOCTYPE>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <style>
        .panel{
            width: 760px;
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 20px;
            margin: 10px auto;
            text-align:center;
            font-size: 30px;
            color: #444;
        }
        .panel input{
            font-size: 14px;
            color: #444;
            padding: 5px;
        } 
        .panel input[type=text]{
            width: 100px;
        }
        .list{
            width: 800px;
            border: 1px solid #ddd;
            margin: 10px auto;
        }
        .list table{
            width: 800px;
			border-collapse: collapse;
			border: 1px solid #ccc;
			font-size: 14px;
			font-family: 'Microsoft YaHei';
			line-height: 14px;
			color: #444;
        }
        .list thead{
            background-color: #369;  
            color: #fff;          
            font-weight: bold;
            font-size: 16px;
        }
        .list th , .list td{
            border: 1px solid #ccc;
            padding: 10px;
            text-align: center;
        }
        .list tbody a{
            color: #369;
            text-decoration: none;
        }
    </style>
    <script>
    function del(){
		if(confirm('确认要删除吗?')){
			return true;
		}else{
			return false;
		}
	}
    </script>
</head>
<body>
    <div class="panel">
       	 所有员工信息如下   
    </div>
    <div class="list">
        <table>
            <thead>
                <tr>
                    <th>用户名</th>
                    <th>密码</th>
                    <th>真实姓名</th>
                    <th>性别</th>
                    <th>出生日期</th>
                    <th>职位</th>
                    <th>操作</th>
                </tr>
            </thead>
			<tbody>
					<tr th:each="l:${list}">
						<td th:text="${l.username}"></td>
						<td th:text="${l.password}"></td>
						<td th:text="${l.name}"></td>
						<td th:text="${l.sex}"></td>
						<td th:text="${l.birthday}"></td>
						<td th:text="${l.position}"></td>
		    			<td><a th:href = "@{'/admin/findStaffByUsername?username='+${l.username}}">查看</a>|<a th:href = "@{'/admin/deleteStaffByUsername?username='+${l.username }}" onclick="return del()">删除</a></td>
 					</tr>
            </tbody>
        </table>
    </div>
</body>
</html>